Skip to content

Check return values of every call to the hdf5 library#6029

Merged
prckent merged 2 commits into
QMCPACK:developfrom
ye-luo:remove-unused
Jul 7, 2026
Merged

Check return values of every call to the hdf5 library#6029
prckent merged 2 commits into
QMCPACK:developfrom
ye-luo:remove-unused

Conversation

@ye-luo

@ye-luo ye-luo commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

I was asking LLM to remove unused variables and realized that we should actually check return value of hdf5 calls. So I asked LLM to safeguard every necessary hdf5 call. It still needs a bit hand holding and I corrected a few sub-optimal lines.

What type(s) of changes does this code introduce?

  • Bugfix

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

laptop

Checklist

    • I have read the pull request guidance and develop docs
    • This PR is up to date with the current state of 'develop'
    • Code added or changed in the PR has been clang-formatted
    • This PR adds tests to cover any new code, or to catch a bug that is being fixed
    • Documentation has been added (if appropriate)

prckent
prckent previously approved these changes Jul 7, 2026

@prckent prckent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

Looks OK by eye; I hope not to have missed a subtle logic change.

@ye-luo

ye-luo commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Test this please

@prckent prckent enabled auto-merge July 7, 2026 22:35
@prckent prckent merged commit e2fd8e3 into QMCPACK:develop Jul 7, 2026
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants